home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9204.ARJ / 1004020B < prev    next >
Text File  |  1992-06-02  |  253b  |  12 lines

  1. /* rand function */
  2. #include <stdlib.h>
  3.  
  4. /* the seed */
  5. unsigned long _Randseed = 1;
  6.  
  7. int (rand)(void)
  8.     {    /* compute pseudo-random value */
  9.     _Randseed = _Randseed * 1103515245 + 12345;
  10.     return ((unsigned int)(_Randseed >> 16) & RAND_MAX);
  11.     }
  12.